<!DOCTYPE  html>
<html>
{include file="head.html"}
<body>
	<div class="tabs-border">
		<a class="item active" href="{$appadmin}?m=user_auth">认证审核</a>
		<a class="item" href="{$appadmin}?m=user_auth&a=old">认证会员</a>
	</div>
    
   <div class="main-body"> 
    	<style>
        	.ua .box{ width:48%;  float:left;}
			.ua .box.m{margin-right:2%;}
        </style>
    	<div class="ua">
        	<div class="box m">
            	<table class="table-add">
                	<tr>
                    	<td width="100">姓名</td>
                        <td>{$data.truename}</td>
                    </tr>
                    <tr>
                    	<td width="100">身份证</td>
                        <td>{$data.user_card}</td>
                    </tr>
                    
                    <tr>
                    	<td width="100">电话</td>
                        <td>{$data.telephone}</td>
                    </tr>
                    
                    <tr>
                    	<td width="100">收入</td>
                        <td>{$data.income}</td>
                    </tr>
                    
                    <tr>
                    	<td width="100">简介</td>
                        <td>{$data.info}</td>
                    </tr>
                    
                    <tr>
                    	<td>照片</td>
                        <td>
                        	{get data=imgs model=imgs fun=get("user_auth_new","$data.userid")}
                            {foreach item=c from=$imgs}
                            <a href="{$c.imgurl|images_site}" target="_blank"><img src="{$c.imgurl|images_site}.small.jpg" width="120"></a>
                            {/foreach}
                        </td>
                    </tr>
                    
                    <tr>
                    	<td width="100"></td>
                        <td> <div id="row-status">
						{if $data.status eq 0}
						<a href="javascript:;" class="btn" id="apass" userid="{$data.userid}">通过</a>  
                        	<a href="javascript:;" class="btn btn-warning" id="aforbid" userid="{$data.userid}">不通过</a> 
                            {else}
                            	{if $data.status eq 1}审核通过{else}审核不通过{/if}
                            {/if}
                            </div>
                        </td>
                    </tr>
                </table>
            </div>
       		<div class="box">
            {if $odata.truename}
            	<table class="table-add">
                	<tr>
                    	<td width="100">姓名</td>
                        <td>{$odata.truename}</td>
                    </tr>
                    <tr>
                    	<td width="100">身份证</td>
                        <td>{$odata.user_card}</td>
                    </tr>
                    
                    <tr>
                    	<td width="100">电话</td>
                        <td>{$odata.telephone}</td>
                    </tr>
                    
                    <tr>
                    	<td width="100">收入</td>
                        <td>{$odata.income}</td>
                    </tr>
                    
                    <tr>
                    	<td width="100">简介</td>
                        <td>{$odata.info}</td>
                    </tr>
                    
                    <tr>
                    	<td>照片</td>
                        <td>
                        	{get data=imgs model=imgs fun=get("user_auth","$odata.userid")}
                            {foreach item=c from=$imgs}
                            <a href="{$c.imgurl|images_site}" target="_blank"><img src="{$c.imgurl|images_site}.small.jpg" width="120"></a>
                            {/foreach}
                        </td>
                    </tr>
                    
                     
                </table>
            {/if}
            </div>
     	<div></div>
    </div>
</div>
{include file="footer.html"}
<script>
$(document).on("click","#apass",function(){
	$.get("{$appadmin}?m=user_auth&a=pass&ajax=1&userid="+$(this).attr("userid"),function(data){
		if(data.error){
			skyToast(data.message);
		}else{
			$("#row-status").html(data.message);
		}
		
	},"json");
});

$(document).on("click","#aforbid",function(){
	$.get("{$appadmin}?m=user_auth&a=forbid&ajax=1&userid="+$(this).attr("userid"),function(data){
		if(data.error){
			skyToast(data.message);
		}else{
			$("#row-status").html(data.message);
		}
	},"json");
});
</script>
 </body>
</html>